Functions


Functions that create objects
Button Checkmark HBar HSpace
HVSpace Label MakeObj MenuItem
NewObj String Text ToggleButton
VSpace XNewObj
Functions that manipulate objects
Add AppMessage AppPushID DandD
Dispose DoMethod GetAttr Handle
KillNotify MultiGetAttr MultiSetAttr NewHandle
Notify PushMethod Remove Set
SetAttr SetAttrs xget
Various
Child MUIRequest ParseText RxMUIGetVar
RxMUISetVar SetRxMUIStack
Debug
GetRxMUIString Help RxMUIObjExists RxMUIObjList
RxMUIOpt

Add

Adds an object.
Synopsis
res = Add(parent,child,before)
<parent>,<child>,[before]
Function
Adds child to parent.

The rules are:

  1. child bust be free
  2. parent and child must be compatible
Inputs
parent - the object to add child to
child - the object to add to parent
before - add child before this (just for Menu and Menuitem)
Result
res - 0 for success or >0 for failure
The function may fail if:
[NO_MEM] not enogh resources to complete the operation
[NO_OBJ] parent or child not found
[BUSY_OBJ] child is busy
See
Remove()

Index

AppMessage

Instructs RxMUI to receive APPEVENT.
Synopsis
res = AppMessage(obj)
<obj>
Function
Tells RxMUI you want to receive APPEVENT when an icon is dropped into obj.

The rules are:

  1. obj can be any kind of object not only a window
  2. obj must be in a window linked to an application
Inputs
obj - the object you want to receive APPEVENT from
Result
res - 0 for success or >0 for failure
The function may fail if:
[NO_MEM] not enogh resources to complete the operation
[NO_OBJ] obj not found
See
Object handling

Index

AppPushId

Returns an export key.
Synopsis
res = AppPushID(app)
<app>
Function
This function returns a key ID to be used with PushMethod().

You pass it the name of an Application object and it will return a key string ID that can be exported to another ARexx macros and used with PushMethod().

The result is NOT of your interest: the only thing you can do is to match it with Null() to see if the function failed (may fail iff its argument is not an application).

This is the mechanism used to control a RxMUI object outside the macro where it was created (remember that MUI in itself is monotask oriented and RxMUI is supposed to be SAFE):

  • in macro A:
    • create your application
    • obtain a key with this function.
    • launch the other macro B and pass it the key
  • in macro B

    Any time PushMethod() is used in B , the macro B is suspended until the method reaches its goal. This makes the all thing very safe.

Inputs
app - the application to export
Result
key - a key or Null() for failure
The function may fail if:
[NO_OBJ] app not found or it is not an application object
Example
let's suppose you created an application object and a text object named "info":
  • in macro A:
        key = AppPushID("app")
        address command "run >nil: <nil: B" c2x(key)
  • in macro B:
        parse arg id
        id = x2c(id)
        call PushMethod(id,"info","set","contents","Ok, I started")
See
PushMethod()

Index

DandD

Instructs RxMUI to be prepared for drag and drop.
Synopsis
res = DandD(from,to,flags)
<from>,<to>,[flags]
Function
Tells RxMUI to install a drag and drop mechanism from from to to .

At the moment, flags is one or more of:

  • NOSELF - forbid an object (e.g. a List) to perform drag and drop within itself; the other flags are ignored, so d&d must be handled manually
  • BOTH - the d&d is also from to to from
  • REMOVE - remove dragged entries from a Listview
  • AUTO - drag & drop is performed internally by RxMUI itself, between:
    • list <-> list
    • list <-> string
    • list -> text
    • string <-> string
    • string -> text

If you don't specify AUTO, drag and drop must be handled by yourself in the macro. Look at the examples.

Inputs
from - the drag start from this object
to - the drop goes to this object
flags - see above
Result
res - 0 for success or >0 for failure
The function may fail if:
[NO_MEM] not enogh resources to complete the operation
[NO_OBJ] from or to not found
[BAD_DANDD] objects are not compatible for an AUTO D&D operation
See
Object handling

Index

Dispose

Disposes an object.
Synopsis
res = Dispose(obj)
<obj>
Function
Disposes an object.

The rules are:

  1. The object can refuse to be disposed
  2. The object is first removed and then disposed
  3. Any notification to the object is killed
Inputs
obj - the object to dispose
Result
res - 0 for success or >0 for failure
The function may fail if:
[NO_OBJ] obj not found
[BUSY_OBJ] obj is busy

Index

DoMethod

Invokes a method.
Synopsis
res = DoMethod(obj,method,parms)
<obj>,<method>,{parms}
Function
Invokes a method on an object.

Any class defines the rules for its own methods.

Inputs
obj - the object to invoke method on
method - a valid and direct method for obj
parms - parameters for method
Result
res - 0 for success or >0 for failure
The function may fail if:
[NO_OBJ] obj not found
[NO_METHOD] method is not valid for obj
[METHOD_NOTIFYONLY] method may only be used in notifications
See
Methods

Index

PushMethod

Invokes a method on a foreign object.
Synopsis
res = PushMethod(keyID,obj,method,parameters)
<keyID>,<obj>,<method>,{parameters}
Function
Invokes a method on a object outside the macro where it was created.
Inputs
key - the key return by AppPushID()
obj - the object to invoke method on
method - a valid and direct method for obj
parms - parameters for method
Result
res - 0 for success or >0 for failure
The function may fail if:
[NO_OBJ] obj not found
[NO_METHOD] method is not valid for obj
[METHOD_NOTIFYONLY] method may only be used in notifications
See
AppPushID()

Index

GetAttr

Reads an attribute.
Synopsis
res = GetAttr(obj,attr,var)
<obj>,<attr>,<var>
Function
Reads the value of an attribute of an object.
Inputs
obj - the object to read the attribute of
attr - the attribute to read
var - an ARexx var name where the value of attr will be written
Result
res - 0 for success or >0 for failure
The function may fail if:
[NO_OBJ] obj not found
[ATTR_IS_NOT_G] the attribute can't be read
[BAD_SET_GET] the operation failed for some reasone
Example
call GetAttr("string","contents","c")
say c
See
MultiGetAttr() xget()

Index

xget

Reads an attribute.
Synopsis
value = xget(obj,attr)
<obj>,<attr>
Function
Reads an attribute of an object and returns its value.

Warning: if the attribute is a string, not numeric, its value will be truncated to the first null char found.

Inputs
obj - the object to read the attribute of
attr - the attribute to read
Result
value - the value of the attribute
Example
say xget("string","contents")
See
MultiGetAttr() GetAttr()

Index

Handle

Handles an Application object.
Synopsis
res = Handle(app,stem,signals)
<app>,<stem/V>,[signals/N]
Function
Please, use this function sparerly, because it uses many cpu time. Usually, you should use NewHandle(), eccept when there is a very hard need to wait for signals in the macro itself. I never had such a need.

Handles the object app of class Application.

Handling of applications in RxMUI is done via this function.

The standard cycle to do that is:

    ctrl_c=2**12
    s=0
    do forever
        call handle("APP","H",s)
        do i=0 to h.num-1
            if h.i="QUIT" then exit
            if h.i==... then
            ...
        end
        s=Wait(or(h.signals,ctrl_c))
        if and(s,ctrl_c)~=0 then exit
    end

Handle() writes in stem.num the number of the entries to be parsed and in stem.i i=0,...,stem.num-1 the name of the object.

When stem.i is QUIT the application wants to exit and the user should exit from the macro or dispose the application.

Otherwise stem.i is the name of an object that notified the application via a

    res = Notify(obj,attr,value,"APP","RETURNID")

The cycle is very critical: if you do time consuming operation (ARexx is slow !!!) you should invoke the method INPUTBUFFERED on the application as in:

    ctrl_c=2**12
    s=0
    do forever
        call handle("APP","H",s)
        do i=0 to h.num-1
            if h.i="QUIT" then exit
            if h.i=="GO" then
                do i=0 to 1000
                    say i
                    call DoMethod("APP","INPUTBUFFERED")
                end
            end
        end
        s=Wait(or(h.signals,ctrl_c))
        if and(s,ctrl_c)~=0 then exit
    end

If you need to wait for other signals (e.g. for messages on a port) you can pass them to the rmh.library/Wait() function.

Inputs
app - the application to handle
stem - an ARexx stem name the function will fill
signals - signal received by wait()
Result
res - 0 for success or >0 for failure
The function may fail if:
[NO_OBJ] app not found or it is not an application object
See
NewHandle() Object handling

Index

NewHandle

Handles an Application object.
Sinopsys
res = NewHandle(app,stem,signals)
<app>,<stem/V>,[signals/N]
Function
Handles the object app of class Application.

Handling of applications in RxMUI is done via this function.

The standard cycle to do that is:

    ctrl_c=2**12
    do forever
        call NewHandle("APP","H",ctrl_c)
        if and(h.signals,ctrl_c)>0 then exit
        select
            when h.event="QUIT" then exit
            when h.event==... then
            ...
        end
    end

As you can see the difference with Handle() is that NewHandle() always returns just one event and waits internally for the signals.

You should use Handle() only in the case you really have to wait for the signals in your code (e.g. you have to call rxsocket.library/WaitSelect() to wait for sockets events).

NewHandle() reads from stem:

  • .NoWait - a boolean wich indicates if the function should wait for signals or not. Default is 1.
    • NewHandle() writes in stem:

      • .EventFlag - a boolean which indicates that there is an event to be dispatched
      • .Event - the name of the event that triggered a notification to the application.
      • .Signals - the user-signals received, if any

      When stem.event is QUIT the application wants to exit and the user should exit from the macro or dispose the application.

      Otherwise stem.event is the name of an object that notified the application via a

          res = Notify(obj,attr,value,"APP","RETURNID")

      If you need to wait for other signals (e.g. for messages on a port) you can pass them to the function.

Inputs
  • app - the Application object to handle
  • stem - stem name the function will fill
  • signals - user signals to wait for
Result
res - 0 for success or >0 for failure
See
Handle() Object handling

Index

Notify

Adds a notification.
Synopsis
res = Notify(notifier,attr,value,target,method,parameters)
<notifier>,<attr>,<value>,<target>,<method>,{parameters}
Function
Adds a notification from notifier to target triggered by attr when it changes to value invoking method on target with parameters.
Inputs
notifier - the object that notifies
attr - the attribute that triggers the notification
value - the value of attr that causes the notification
target - the target of the notification. Specials values are:
  • _app - the application notifier belongs to
  • _win - the window notifier belongs to
  • _self - notifier itself
method - a valid an indirect method to invoke on target
parms - parameters for method 
Result
res - 0 for success or >0 for failure
The function may fail if:
[NO_OBJ] notifier or target not found
[NO_METHOD] method is not valid for target
[METHOD_NONOTIFY] method is direct-only
[BAD_NOTIFY] the notification can't be added for some reasone
See
Notification

Index

Help

Returns RxMUI functions help strings.
Synopsis
string = help(fun)
<fun>
Function
Returns the help string associated with the function fun.

The same string can be obtained with rxhelp.

Inputs
fun - a RxMUI function name
Result
string - the help string for fun

Index

KillNotify

Kills notifications.
Synopsis
res = KillNotify(a,b)
<a>,<b>
Function
Kills any notification from a to b.
Inputs
a - the notifier
b - the notified
Result
res - 0 for success or >0 for failure
The function may fail if:
[NO_OBJ] a or b not found
See
Notification

Index

NewObj

Creates an object.
Synopsis
res = NewObj(className,objName,stem,freeChild)
<className>,<objName/V>,[stem/V],[freeChild/N]
Function
Create an object of class className named objName reading its attribute from stem, if present, or objName.

freeChild makes NewObj() destroy all the internal buffers and resets child stems.

Note that during object creation, all the objects defined in objName itself or stem, if supplied, are created.

Inputs
className - the class the object is istance of
objName - the name of the object
stem - Init attribute are here, if present
freeChild - reset children - default 1
Result
res - 0 for success or >0 for failure
The function may fail if:
[NO_MEM] not enogh mem to complete the operation
[BAD_VALUE] some Init attributes was set to a bad value
[BAD_NUMBER] some Init attributes was set to a bad number
[NO_CLASS] className not found
[NO_MUI] a required MUI class not found
[NO_MCC] a required MCC not found
[NO_RXMEC] a required rxmec not found
See
Objects creation

Index

XNewObj

Creates an object.
Synopsis
name = XNewObj(className,objName,stem,freeChild)
<className>,<objName/V>,[stem/V],[freeChild/N]
Function
Create an object of class className named objName reading its attribute from stem, if present, or objName.

freeChild makes XNewObj() destroy all the internal buffers and resets child stems.

Inputs
className - the class the object is istance of
objName - the name of the object
stem - Init attribute are here, if present
freeChild - reset children - default 1
Result
name - the name of the object or an empty string on failure
The function may fail if:
[NO_MEM] not enogh mem to complete the operation
[BAD_VALUE] some Init attributes was set to a bad value
[BAD_NUMBER] some Init attributes was set to a bad number
[NO_CLASS] className not found
[NO_MUI] a required MUI class not found
[NO_MCC] a required MCC not found
[NO_RXMEC] a required rxmec not found
See
Objects creation

Index

Remove

Removes an object.
Synopsis
res = Remove(obj)
<obj>
Function
Remove obj from its parent.

The rules are:

  1. The object may refuse to be removed
Inputs
obj - the object to remove
Result
res - 0 for success or >0 for failure
The function may fail if:
[NO_OBJ] obj not found
[BUSY_OBJ] obj is busy
See
Objects creation

Index

Set

Writes the value of an attribute of an object.
Synopsis
res = set(obj,attr,value)
<obj>,<attr>,<value>,[NoNotify/N]
Function
Sets ONE attribute of ONE object.
SetAttr() is a synonimous for set().
Inputs
obj - the object to set the attribute of
attr - the S-attribute to set
value - the value of the attribute
NoNotify - an ARexx boolean that indicates to the function to perform a nnset rather that a set
Result
res - 0 for success or >0 for failure
The function may fail if:
[NO_OBJ] obj not found
[BAD_NUMBER] bad integral number format
[BAD_VALUE] the type of value is not compatible with the type of attr
[BAD_SET_GET] the attributes can't be set for some reasone
Example
call set("win","open",1)
See
MultiSetAttrs() SetAttrs()

Index

SetAttrs

Sets many attributes of an object.
Synopsis
res = SetAttrs(obj,stem)
<obj>,<stem/V>
Function
Sets many attributes of an object at once.
Inputs
obj - the object to set the attributes of
stem - an ARexx stem name
Result
res - 0 for success or >0 for failure
The function may fail if:
[NO_OBJ] obj not found
[BAD_NUMBER] bad integral number format
[BAD_VALUE] the type of a value is not compatible with the type of an attribute
[BAD_SET_GET] the attributes can't be set for some reasone
Example
set.disabled=0
set.contents="I am disabled"
call SetAttrs("string","set")
See
MultiSetAttrs() set()

Index

MultiGetAttr

Reads the values of an attribute of many objects.
Synopsis
res = MultiGetAttr(stem)
<stem/V>
Function
Reads the values of an attribute of many objects at once.
Inputs
stem - a stem name where to set the couple object/attribute in the field .N .n.attr and where the function will write the values in .N.value (n=0,...).
Result
res - 0 for success or >0 for failure
The function may fail if:
[NO_OBJ] one object not found
[BAD_SET_GET] one attribute can't be read for some reasone
Example
get.0="host" ; get.0.attr="contents"
get.1="hostport" ; get.1.attr="integer"
call MultiGetAttr("get")
say get.0.value
say get.1.value
See
GetAttr() xget()

Index

MultiSetAttr

Writes an attribute of many objects.
Synopsis
res = MultiSetAttr(stem)
<stem/V>,[NoNotify/N]
Function
Writes an attribute of many objects at once.
Inputs
stem - a stem name where to specify the object/attribute/value to set
NoNotify - an ARexx boolean that indicates to the function to perform a nnset rather that a set
Result
res - 0 for success or >0 for failure
The function may fail if:
[NO_OBJ] one object not found
[BAD_NUMBER] bad integral number format
[BAD_VALUE] the type of a value is not compatible with the type of an attribute
[BAD_SET_GET] one attribute can't be set for some reasone
Example
set.0="host"; set.0.attr="contents";set.0.value="www.amiga.org"
set.1="hostport"; set.1.attr="integer"; set.1.value = 80
call MultiSetAttr("set")
See
set() SetAttrs()

Index

Button

Creates a button.
Synopsis
oname = button(name,text)
<name>,<text>
Function
Creates a button object named name with text as label.
Inputs
name - the name of the button
text - the label of the button
Result
oname - an empty string on failure; name on success
The function may fail if:
there are not enogh resources to complete the operation
See
Text class

Index

ToggleButton

Creates a toggle button.
Synopsis
oname = ToggleButton(name,text,selected)
<name>,<text>,[selected/N]
Function
Creates a toggle button object named name with text as label in selected state.
Inputs
name - the name of the button
text - the label of the button
selected - the state of the button
Result
oname - an empty string on failure; name on success
The function may fail if:
there are not enogh resources to complete the operation
See
Text class

Index

Checkmark

Creates a checkmark.
Synopsis
oname = checkmark(name,selected)
<name>,<selected/N>,[cchar]
Function
Creates a checkmark object named name in selected state.
Inputs
name - the name of the checkmark
selected 0 the object is not selected, 1 the object is selected 
cchar - the control char for the object
Result
oname - an empty string on failure; name on success
The function may fail if:
there are not enogh resources to complete the operation
See
Image class

Index

HBar

Creates a HBar.
Synopsis
oname = HBar(pixels)
[pixels/N]
Function
Creates a HBar objects.
Inputs
pixels - the width in pixels
Result
oname - an empty string on failure; on success, the name of the object as an internal string
The function may fail if:
there are not enogh resources to complete the operation
See
MakeObj Rectangle class

Index

VBar

Creates a VBar.
Synopsis
oname = VBar(pixels)
[pixels]
Function
Creates a VBar objects.
Inputs
pixel - the height in pixels
Result
oname - an empty string on failure; on success, the name of the object as an internal string
The function may fail if:
there are not enogh resources to complete the operation
See
MakeObj Rectangle class

Index

HSpace

Creates a HSpace.
Synopsis
oname = HSpace(pixels)
[pixels/N]
Function
Creates a HSpace objects.
Inputs
pixels - the width in pixels
Result
oname - an empty string on failure; on success, the name of the object as an internal string
The function may fail if:
there are not enogh resources to complete the operation
See
MakeObj Rectangle class

Index

VSpace

Creates a VSpace.
Synopsis
oname = VSpace(pixels)
[pixels/N]
Function
Creates a VSpace objects.
Inputs
pixels - the height in pixels
Result
oname - an empty string on failure; on success, the name of the object as an internal string
The function may fail if:
there are not enogh resources to complete the operation
See
MakeObj Rectangle class

Index

HVSpace

Creates a HVSpace.
Synopsis
oname = HVSpace(pixels)
[pixels/N]
Function
Creates a HVSpace objects.
Inputs
pixels - the dimension in pixels
Result
oname - an empty string on failure; on success, the name of the object as an internal string
The function may fail if:
there are not enogh resources to complete the operation
See
MakeObj Rectangle class

Index

MenuItem

Create a menuitem
Synopsis
oname = MenuItem(name,title,shortcut,checked,checkit,enabled)
<name>,<title>,[shortcut],[flags],[exclude/N]
Function
Creates a Menuitem object.

title can be the special value "BAR" to create a bar.

Inputs
name - the name of the object
title - the title of the item
shortcut - the shortcut for the item
flags - One or more of:
  • CHECKED
  • CHECKIT
  • DISABLED
  • TOGGLE
exlude - the mutual exclude mask
Result
oname - an empty string on failure; name on success
The function may fail if:
there are not enogh resources to complete the operation
See
MakeObj Menu class

Index

Label

Creates a label. 
Synopsis
oname = label(label,flags)
<label>,[flags]
Function
Creates un unnamed label object.

flags is one of:

  • LEFT
  • CENTER
Inputs
label - the text of the label
flags - see above
Result
oname - an empty string on failure; an internal string on success
The function may fail if:
there are not enogh resources to complete the operation
See
Text class MakeObj()

Index

MakeObj

Create a MUI objetcs. 
Synopsis
oname = MakeObj(name,type,parms)
[name],<type>,{parms}
Function
Creates a MUI Object.

Type can be one of:

  • Balance - creates a Balance object.
    No parm defined.
  • BarTitle - creates a Bar with a title.
    Parms are:
    [text]
  • BetterBalance - creates a BetterBalance object.
    Parms are:
    <ObjectID/N>
  • Busy - creates a Busy object.
    No parm defined.
  • ColGroup - creates a columned Group.
    Parms are:
    <cols/N>,<obj1>,{obj}
  • Cycle - creates a Cycle object.
    Parms are:
    <entries>,[key],[active/N]
  • Gauge - creates a horiz Gauge object.
    Parms are:
    [FixHeightTxt],[max/N],[current/N],[InfoText]
  • HBar - creates a horiz Bar.
    Parms are:
    [pixels/N]
  • HCenter - center one object in a horiz Group.
    Parms are:
    <obj>
  • HFrameGroup - incapsulate one object in a horiz framed Group.
    Parms are:
    [title],<obj>,[class]
  • HGroup - creates a horiz Group.
    Parms are:
    <obj1>,{obj}
  • HLeft - incapsulate one object in a horiz Group with an hspace at the right.
    Parms are:
    <obj>
  • HRight - incapsulate one object in a horiz Group with an hspace at the left.
    Parms are:
    <obj>
  • HSpace - creates a horiz Space.
    Parms are:
    [pixels/N]
  • ImageButton - creates an Image button.
    Parms are:
    [imgSpec],[key],[selected/N]
  • Knob - creates a Knob.
    Parms are:
    [key],[min/N],[max/N],[val/N],[default/N]
  • Levelmeter - creates a Levelmeter.
    Parms are:
    [key],[min/N],[max/N],[val/N],[label],[default/N]
  • Menu - creates a Menu.
    Parms are:
    <title>,{obj}
  • Menuitem - adds Menuitems to a Menuitem.
    Parms are:
    <MainMenuitem>,{Menuitem}
  • Menustrip - creates a Menu strip.
    Parms are:
    {obj}
  • Numericbutton - creates a Numericbutton.
    Parms are:
    [key],[min/N],[max/N],[val/N],[format],[default/N]
  • NumericString - creates a numeric String.
    Parms are:
    [key],[min/N],[max/N],[maxlen/N],[val/N]
  • Radio - creates a Radio object.
    Parms are:
    <entries>[key],[active/N]
  • RowGroup - creates a rowed group.
    Parms are:
    <rows/N>,<obj1>,{obj}
  • Scale - creates a Scale object.
    No parm defined.
  • Slider - creates a Slider.
    Parms are:
    [key],[min/N],[max/N],[val/N],[format],[default/N]
  • VBar - creates a vert Bar.
    Parms are:
    [pixels/N]
  • VCenter - center one object in a vert Group.
    Parms are:
    <obj>
  • VDown - incapsulate one object in a vert Group with an hspace at the bottom.
    Parms are:
    <obj>
  • VFrameGroup - incapsulate one object in a vert framed Group.
    Parms are:
    [title],<obj>,[class]
  • VGroup - creates a vert Group.
    Parms are:
    <obj1>,{obj}
  • VSpace - creates a vert Space.
    Parms are:
    [pixels/N]
  • VUp - incapsulate one object in a vert Group with an hspace at the top.
    Parms are:
    <obj>
Inputs
name - the name of the object
type - the type of the object
parms - parameters
Result
oname - an empty string on failure; on success, the name of the object, as an internal string if name was omitted or it was specified as an empty string, name itself otherwise
The function may fail if:
there are not enogh resources to complete the operation
same sub object creation failure
[NO_MUI] a required MUI class not found
[NO_MCC] a required MCC not found
[NO_RXMEC] a required rxmec not found

Index

String

Creates a string.
Synopsis
oname = string(name,cchar,contents,max)
<name>,[cchar],[contents],[max/N]
Function
Creates a string object.
Inputs
name - the name of the object
cchar - the control char for the object
content - the initial content
max - max number of chars
Result
oname - an empty string on failure; name on success
The function may fail if:
there are not enogh resources to complete the operation
[NO_MCC] a required MCC not found
[NO_RXMEC] a required rxmec not found
See
MakeObj String class

Index

Text

Creates a text object. 
Synopsis
oname = text(name,text,frame,background,preparse)
<name>,[text],[frame],[background],[preparse]
Function
Creates a text object.
Inputs
name - the name of the object
text - the initial content of the object
frame - the frame for the object - default TEXT
background - the background for the object - default TEXTBACK
preparse - the preparse for the object - default %c
Result
oname - an empty string on failure; name on success
The function may fail if:
there are not enogh resources to complete the operation
See
Text class

Index

ParseText

Parses text.
Synopsis
parsedtext = ParseText(text)
<text>
Function
Parses a text translating to the MUI text engine format.

Refer to the MUI text class autodoc.

The changes made on text are:

  • %c is changed to \\33c ("1B"x || c) (where c is ANY char)
  • \n is changed to "0A"x
  • \r is changed to "0D"x

Without this function the strings to pass as CONTENTS attribute of text line or as TEXT parameters of a Button object or as entry of a List object would be too complicated.

Inputs
text - the text to parse 
Result
parsedText - the text parsed

Index

Child

Defines a child. 
Synopsis
call child(parent,name,class)
<parent>,<name>,[class]
Function
To use at object specification phase.
    call child("G","S","STRING")

just tells RxMUI to:

  • init g.0 to S - if it is the first time that child("G" ... ) is used
  • init g.i to S - if it the i-th time that child("G" ...) is used s.class="STRING"

A often used form is as in

    call child("MPROJECT",Menuitem("MOPEN","Open","O"))
Inputs
parent - the container, parent of name
name - the name of the object, child of parent
class - the class of name
Result
none
See
NewObj()

Index

MUIRequest

Shows a requester. 
Synopsis
res = MUIRequest(app,win,title,gadgets,text)
<app>,<win>,<title>,<gadgets>,<text>
Function
Shows a MUI requester.

This function is descouraged. Use it sparerly, just to show errors and then exit.

If you have to report messages to the user, you should better open a little window with a text (floattext) object and use it.

Inputs
app - the name of an application object
win - the name of a window object that belongs to app
title - the title of the requester
gadgets - a string containing the text for the gadgets separated with a |
text - the MUI text of the requester
Result
res - the number of the gadget the user pressed to exit from the requester, with the usual requester-gadgets convenction.

Index

SetRxMUIStack

Set RxMUI stack size. 
Synopsis
call SetRxMUIStack(stack)
<stack/N>
Function
Sets the RxMUI swap-stack size of the macro.

Every RxMUI function is executed under a stack swap.

Default stack size is 24k, but in certain situation with some object, e.g. with NListview, a very large stack is required. You can set the stack size with this function. RxMUI will allocate the new stack iff size is >16k bytes. If the stack can not be allocated error 3 is generated.

Inputs
stack - the new stack size
Result
none

Index

GetRxMUIString

Returns an error string. 
Synopsis
res = GetRxMUIString(id)
<id/N>
Function
The strings are read from the catalog rxmui.catalog if present.

At this moment RxMUI errors code are:

51 NO_MEM too few memory
Not enogh resources to perform the required operation, e.g. no mem or no Exec signal avaible.
52 ARG_MISS required argument missed
A required arguments was not supplied, e.g. attempt to create a Cycle object without defing the attribute Entries.
53 BAD_NUMBER bad number
The format of an integral number is not valid.
54 BAD_VALUE bad value
The value of an argument is not valid, or not in the range of the accepted values and so on.
55 NO_CLASS can't find class
Attempt to create an object of a class that can't be found. It might also mean that an external RxMUI class is missed.
56 OBJ_EXISTS object already exists
Not used.
57 NO_OBJ can't find object
An object can't be found.
58 BUSY_OBJ object is busy
An object is currently busy, e.g. attempt to add an object that was already added or attempt to use a Menustrip, used by an Application obejct as Menustrip, as Contextmenu of another object and so on.
59 OBJ_CANT_BE_ADDED incompatible objects
A couple of obejcts was interested in an operation but the objects are not compatible for that operation, e.g. attempt to add a Window object to a Group and so on.
60 CANT_CREATE_OBJ object not created
The object was not created for some reasone.
61 BAD_SET_GET bad attribute set or get
The reading/setting attributes operation failed for some reasone.
62 OBJ_CANT_BE_DISPOSED object can't be disposed
Attempt to dispose an object failed, because the object is in use somewhere, e.g. it is a Contextmenu or it is part of a Popstring object and so on.
63 OBJ_CANT_BE_REMOVED object can't be removed
Attempt to remove an object failed, because the object is in use somewhere, e.g. it is part of a Popstring object and so on.
64 BAD_DANDD incompatible objects for D&D
Attempt to set up an automatic Drag and Drop failed, because RxMUI doesn't know how to handle the Drag and Drop between the two objects.
65 BAD_ATTRS incompatible attributes
Attempt to set up a notification triggered by an attribute Everytime its valus changes, invoking a method with a Triggervalue parameter that has a different type than the triggering attribute.
66 NO_ATTR can't find attribute
Attempt to perform an operation with an unknown attribute.
67 ATTR_IS_NOT_S attribute is not settable
Attempt to set an attribute that is not S.
68 ATTR_IS_NOT_G attribute is not readable
Attempt to read an attribute that is not G.
69 ATTR_IS_NOT_N attribute is not notificated
Attempt to set up a notification with a triggering attribute that is not N.
70 NO_METHOD can't find method
A method can't be found.
71 METHOD_NOTIFY_ONLY the method can be notified only
Attempt to directly use a notify-only method in DoMethod().
72 METHOD_NONOTIFY the method can't be notified
Attempt to set up a notification with a direct-only-method.
73 BAD_NOTIFY can't add notify
Attempt to set up a notification failed for some reasone.
74 BAD_TRIG_ATTR notify condition never true
Attempt to set up a notification with a triggering condition that can't be never true, e.g. the triggering attribute has type S and the trigegring value is Everytime.
75 NO_MCC can't find MUI custom class
Attempt to create an object of a class that is a subclass of a MUI Custom Class that can't be found. E.g. attempt to create a HTLMview object and HTMLview.mcc is not present in MUI:Libs/MUI drawer.
76 NO_MUI can't find MUI class
Attempt to create an object of a class that is a subclass of a MUI Class that can't be found. E.g. attempt to create a Knob object and Knob.mui is not present in MUI:Libs/MUI drawer.
77 NO_RXMEC a required rxmec not found
Attempt to create an object of a class that is a subclass of a RxMUI class, which can't be init or found. It might mean that a RxMUI external class is missed or that there are not enogh resources to perform the operation.

If an error is returned the var RxMUIErr is set to something meaningful, if possible.

Inputs
id - the id of the error string 
Result
res - the string associated with id

Index

RxMUIOpt

Sets or reads RxMUI options. 
Synopsis
res = RxMUIOpt(opt)
<opt>
Function
opt is one or more of:
  • DEBUGMODE
  • SHOWERR

When many objects are created via one single NewObj() call, if an object anywhere can NOT be created, all the created objects are disposed (if possible) and NewObj() returns an error code.

You have no way to know where the creation process stopped and the error was generated. During debugging of a macro is very useful to know exactly which object had problem and or where the problem
appeared.

Setting DEBUGMODE makes RxMUI to remember the first error it discovered in NewObj().

Setting SHOWERR make RxMUI to show a MUI requester with info inside.

After you debugged your macro, you should remove the RxMUIOpt(), because it is supposed that if an error occurs in NewObj(), it is not your fault anymore, but something else such as a "too few memory" condition.

If you don't specify an option, it is cleared.

opt may also be ASK in which case the string
rxmui.library ver.rev (date) [user] Stack MinDefaultStack MinStack DefaultMinStack DebugMode ShowErr
is returned.

Inputs
opt - the options to set or ASK
Result
res - 1 or an info string

Index

RxMUIObjExists

Checks if an object exists. 
Synopsis
res = RxMUIObjExists(obj)
<obj>
Function
Checks if obj exists.
Inputs
obj - an object name
Result
res - An ARexx boolean

Index

RxMUIObjList

Returns the objects list. 
Synopsis
res = RxMUIObjList()
-
Function
Returns an object list string. For debugging porpouse.
Result
res - The objects list.

Index

RxMUIGetVar

Gets a parent macro var.
Synopsis
value = RxMUIGetVar(var)
<var/S>
Function
Many classes permit you to define a inline-macro function to be execute on some events. It is the case of Application/Inline method or Popstring/OpenFun attribute. In the macro you have no access to the vars of the parent macro, but you may still obtain the value of a var via this function.
Inputs
var - the var to read
Result
value - the value of var

Index

RxMUISetVar

Sets a parent macro var.
Synopsis
value = RxMUIGetVar(var,value)
<var/S><value>
Function
Many classes permit you to define a inline-macro function to be execute on some events. It is the case of Application/Inline method or Popstring/OpenFun attribute. In the macro you have no access to the vars of the parent macro, but you may still get the value of a var via this function.
Inputs
var - the var to set
value - the value to set var to
Result
value - value itself

Index